<%@ include file="/common/taglibs.jsp"%>

<html>
<head>
<title>Example :: Multilanguage Application</title>
</head>
<c:set var="locale"><c:out value="${param['locale']}"/></c:set>
<c:if test="${empty locale}">
	<c:set var="locale"><c:out value="${pageContext.request.locale.language}"/></c:set>
</c:if>
<body>
<div style="padding: 50px 0px 50px 0px;margin: 150px 300px 30px 300px;border:solid 1px;align:center;" align="center">
<h3>Current language: <fmt:message key="language.name"/></h3>
<form method="get">
Select new &nbsp;&nbsp;&nbsp;&nbsp;
<select
	name="locale">
	<option value="en" <c:if test="${param['locale'] eq 'en'}"><c:out value='selected="selected"'/></c:if>><fmt:message key="locale.en"/></option>
	<option value="ja" <c:if test="${param['locale'] eq 'ja'}"><c:out value='selected="selected"'/></c:if>><fmt:message key="locale.jp"/></option>
	<option value="fr" <c:if test="${param['locale'] eq 'fr'}"><c:out value='selected="selected"'/></c:if>><fmt:message key="locale.fr"/></option>
	<option value="zh" <c:if test="${param['locale'] eq 'zh'}"><c:out value='selected="selected"'/></c:if>><fmt:message key="locale.zh"/></option>
</select>
<input type="submit" value="Go">
</form>
</div>
<div align="center"><a href="<c:url value='/index.jsp'/>">Go to main page</a> </div>
</body>
</html>
